const index=require('./mock/index.json')
const city =require('./mock/city.json')
const detail=require('./mock/detail.json')
module.exports={
  configureWebpack:{
    resolve:{
      alias:{
        'assets':'@/assets',
        'css':'assets/css',
        'components':'@/components',
        'views':'@/views'
      }
    },
    devServer: {
      port: 8080,
      before(app) {
        app.get("/api/index", (req, res) => {
          res.json(index);
        });
        app.get("/api/city", (req, res) => {
          res.json(city);
        });
        app.get("/api/detail", (req, res) => {
          res.json(detail);
        });
      }
    }
    
  }
}